package com.zhiqihang.ziqihangserverteacher.service.TeacherServiceImpl;

import com.zhiqihang.ziqihangserverteacher.mapper.TeacherMapper;
import com.zhiqihang.ziqihangserverteacher.pojo.DTO.TeacherQuery;
import com.zhiqihang.ziqihangserverteacher.pojo.VO.TeacherVO;
import com.zhiqihang.ziqihangserverteacher.service.TeacherService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class TeacherServiceImpl implements TeacherService {

    @Autowired
    TeacherMapper teacherMapper;

    @Override
    public List<TeacherVO> selectTeacherInfoByQuery(TeacherQuery teacherQuery) {
        //注意必须是在职老师
        log.debug("TeacherQuery:{}", teacherQuery);
        teacherQuery.setStatus(1);
        List<TeacherVO> list = teacherMapper.selectTeacher(teacherQuery);
        log.debug(list.toString());
        return list;
    }
}
